{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="layui-this">留言列表</li>
		</ul>
		<div class="layui-tab-content">
			<form class="layui-form layui-form-pane" action="" method="get">
				<div class="layui-inline">
					<label class="layui-form-label">手机号</label>
					<div class="layui-input-inline">
						<input type="text" name="keyword" value="{$keyword}" placeholder="请输入手机号" class="layui-input">
					</div>
				</div>
				<div class="layui-inline">
					<select name="status">
						<option value="0" {if $status=='0' }selected{/if}>审核状态</option>
						<option value="2" {if $status=='2' }selected{/if}>已审</option>
						<option value="1" {if $status=='1' }selected{/if}>未审</option>
					</select>
				</div>
				<div class="layui-inline">
					<button class="layui-btn">搜索</button>
				</div>
				<a class="layui-btn layui-btn-status page-btns" href="{:url('status',['table'=>'member_message','val'=>2])}"><i class="fa fa-check-circle-o"></i> 通过</a>
				<a class="layui-btn layui-btn-danger page-btns" href="{:url('status',['table'=>'member_message','val'=>1])}"><i class="fa fa-ban"></i> 不通过</a>
			</form>
			<hr>
				<table class="layui-table layui-form">
				<thead>
					<tr>
						<th style="width: 30px;">
							<input type="checkbox" lay-skin="primary" lay-filter="allChoose">
						</th>
						<th>ID</th>
						<th>用户手机号</th>
						<th>内容</th>
						<th>增加时间</th>
						<th>留言人</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<form id="listForm">
					{foreach name="list" item="vo"}
					<tr>
						<td>
							<input type="checkbox" name="ids[]" value="{$vo.id}" class="layui-checkbox checkbox-ids" lay-skin="primary">
						</td>
						<td>{$vo.id}</td>
						<td>{$vo.mobile}</td>
						<td>{$vo.content}</td>
						<td>{$vo.add_time}</td>
						<td>{$vo.username}</td>
						<td>{if $vo.status==2}审核通过{else}未审核{/if}</td>
						<td>
							<a href="{:url('sh_message',['id'=>$vo['id']])}" class="layui-btn layui-btn-normal layui-btn-small">编辑</a>
						</td>
					</tr>
					{/foreach}
					</form>
				</tbody>
			</table>
			<!--分页-->
			{$list->render()}
		</div>
	</div>
</div>
<script>
	// 定义全局JS变量
	var GV = {
		current_controller: "{$controller}/message"
	};
</script>
{/block}